package net.xiangcaowuyu.shiro.mapper;

import net.xiangcaowuyu.shiro.entity.ShiroUser;
import org.apache.catalina.User;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @author laughing
 * @date 2020/10/11
 * @site https://www.lisen.org
 */
@Mapper
public interface ShiroUserMapper {

    int deleteByPrimaryKey(Long id);

    int insert(ShiroUser record);

    int insertSelective(ShiroUser record);

    /**
     * 根据主键获取用户信息
     * @param id Id
     * @return 用户
     */
    ShiroUser selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(ShiroUser record);

    int updateByPrimaryKey(ShiroUser record);

    /**
     * 根据用户编号获取
     * @param userCode 用户编号
     * @return 用户
     */
    ShiroUser findUserByUserCode(String userCode);

    /**
     * 查找所有用户
     * @return
     */
    List<ShiroUser> findAll();
}